<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
<script type="text/javascript">
    function check() {
        var username = document.getElementById("username");
        var password = document.getElementById("password");
        if(username.value == ""){
            alert("账号不能为空!");
            return false;
        }else if(password.value.length < 4){
            alert("口令长度不能少于4个字符!");
            return false;
        }
    }
</script>
</head>
<body>
<center>
    <form action="/WebStoreSSM/controller/loginAction" method="post" onsubmit="return check();">
        <fieldset>
            <legend style="color:#00f" ><h3> Logining </h3></legend>
            <p style="color: #f00">${requestScope.messageLog}</p>
            <p><label>账&nbsp;号：<input type="text" name="username" id="username" value="用户名或邮箱" onfocus="if(value=='用户名或邮箱')value=' ' "></label></p>
            <p><label>口&nbsp;令：<input type="password" name="password" id="password" ></label></p>
            <p><input type="submit" value="登录">
                <a href="register.jsp"><input type="button" value="注册" ></a></p>
        </fieldset>
    </form>
</center>
</body>
</html>